<template>
  <div>
    <button @click="addNum">加10</button>
    <h2>{{ num }}</h2>
  </div>
</template>

<script>
export default {
  props: ["num"],
  methods: {
    addNum() {
      this.$emit("update:num", this.num + 10)
    },
  },
}
</script>
